// 视图组件
const view = {
  tabs: () => import('@/layouts/tabs'),
  blank: () => import('@/layouts/BlankView'),
  page: () => import('@/layouts/PageView')
}

// 路由组件注册
const routerMap = {
  login: {
    authority: '*',
    path: '/login',
    component: () => import('@/pages/login')
  },
  root: {
    path: '/',
    name: '首页',
    redirect: '/login',
    component: view.tabs
  },
  home: {
    path: 'home',
    authority: '*',
    name: '首页',
    component: () => import('@/pages/home')
  },
  basic: {
    name: '基础数据',
    icon: 'cloud-sync',
    component: view.page
  },
  material: {
    name: '物料',
    component: () => import('@/pages/basic/Material')
  },
  supplier: {
    name: '物料',
    component: () => import('@/pages/basic/Supplier')
  },
  agvPointMap: {
    name: 'agv地图点位',
    component: () => import('@/pages/basic/AgvPointMap')
  },
  warehouse: {
    name: '仓库作业',
    icon: 'appstore-o',
    component: view.page
  },
  warehouseIn: {
    name: '入库单',
    component: () => import('@/pages/warehouse/WarehouseIn')
  },
  warehouseReturnIn: {
    name: '退料入库单',
    component: () => import('@/pages/warehouse/WarehouseReturnIn')
  },
  warehouseOut: {
    name: '出库单',
    component: () => import('@/pages/warehouse/WarehouseOut')
  },
  warehouseSplit: {
    name: '批拆作业单',
    component: () => import('@/pages/warehouse/WarehouseSplit')
  },
  warehouseInTask: {
    name: '入库任务',
    component: () => import('@/pages/warehouse/WarehouseInTask')
  },
  warehouseOutTask: {
    name: '出库任务',
    component: () => import('@/pages/warehouse/WarehouseOutTask')
  },
  report: {
    name: '报表',
    icon: 'table',
    component: view.page
  },
  inventory: {
    name: '库存报表',
    component: () => import('@/pages/report/Inventory')
  },
  inventoryHistory: {
    name: '库存记录',
    component: () => import('@/pages/report/InventoryHistory')
  },
  sys: {
    name: '系统中心',
    icon: 'setting',
    component: view.page
  },
  user: {
    name: '员工管理',
    component: () => import('@/pages/sys/User')
  },
  role: {
    name: '角色管理',
    component: () => import('@/pages/sys/Role')
  },
  apiLogReport: {
    name: '接口记录',
    component: () => import('@/pages/sys/ApiLogReport')
  },
  dataLogReport: {
    name: '数据库日志',
    component: () => import('@/pages/sys/DataLogReport')
  },
  agvLogReport: {
    name: '接口记录',
    component: () => import('@/pages/sys/AgvLogReport')
  },
  exp403: {
    authority: '*',
    name: 'exp403',
    path: '403',
    component: () => import('@/pages/exception/403')
  },
  exp404: {
    name: 'exp404',
    path: '404',
    component: () => import('@/pages/exception/404')
  },
  exp500: {
    name: 'exp500',
    path: '500',
    component: () => import('@/pages/exception/500')
  },
}
export default routerMap

